import requests
url="http://www.baidu.com"
response=requests.get(url)
response.encoding=response.apparent_encoding
print(response.text)
print(response.encoding)
print(response.headers)
print(response.url)
print(response.content)
print(response.status_code)
url="https://www.xduph.com/Pages/booklist.aspx?"
data={"classid":"1.1.2."}
r=requests.get(url=url,params=data)
r.encoding=r.apparent_encoding
print(r.text)
url="https://httpbin.org/post"
data={"name":"333","age":"18"}
r=requests.post(url=url,data=data)
r.encoding=r.apparent_encoding
print(r.text)
